package com.ningyue.water.listener;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * Created by steven on 15-11-12.
 */
public class CosumerMessageListener implements MessageListener  {
    @Override
    public void onMessage(Message message) {
        TextMessage textMsg = (TextMessage) message;
        System.out.println("接收到一个纯文本消息。the message is: "+textMsg);
        try {
            System.out.println("消息内容是jj：" + textMsg.getText());
        } catch (JMSException e) {
            e.printStackTrace();
        }
    }
}
